home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / obero / oberon_lib.lha / oberon-a / source1.lha / source / Amiga / FileSysRes.mod < prev    next >
Text File  |  1994-08-08  |  3KB  |  95 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: FileSysRes.mod $
  4.   Description: Interface to FileSystem.resource
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.2 $
  8.       $Author: fjc $
  9.         $Date: 1994/08/08 00:57:14 $
  10.  
  11.   $VER: filesysres.h 36.4 (3.5.90)
  12.   Includes Release 40.15
  13.  
  14.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. MODULE FileSysRes;
  24.  
  25. (*
  26. ** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
  27. ** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
  28. ** $V- OvflChk       $Z- ZeroVars
  29. *)
  30.  
  31. IMPORT E := Exec, D := Dos;
  32.  
  33.  
  34. (*
  35. **      FileSystem.resource description
  36. *)
  37.  
  38. CONST
  39.  
  40.   name * = "FileSystem.resource";
  41.  
  42. TYPE
  43.  
  44.   FileSysResourcePtr * = CPOINTER TO FileSysResource;
  45.   FileSysResource * = RECORD (E.Node) (* on resource list *)
  46.     creator *        : E.STRPTR;      (* name of creator of this resource *)
  47.     fileSysEntries * : E.List;        (* list of FileSysEntry structs *)
  48.   END; (* FileSysResource *)
  49.  
  50.   FileSysEntryPtr * = CPOINTER TO FileSysEntry;
  51.   FileSysEntry * = RECORD (E.Node) (* on fsrFileSysEntries list *)
  52.                                    (* lnName is of creator of this entry *)
  53.     dosType *    : E.ULONG;        (* DosType of this FileSys *)
  54.     version *    : E.ULONG;        (* Version of this FileSys *)
  55.     patchFlags * : SET;            (* bits set for those of the following that *)
  56.                                    (*   need to be substituted into a standard *)
  57.                                    (*   device node for this file system: e.g. *)
  58.                                    (*   180H for substitute SegList & GlobalVec *)
  59.     fseType *    : E.ULONG;        (* device node type: zero *)
  60.     task *       : E.TaskPtr;      (* standard dos "task" field *)
  61.     lock *       : D.FileLockPtr;  (* not used for devices: zero *)
  62.     handler *    : D.BSTR;         (* filename to loadseg (if SegList is null) *)
  63.     stackSize *  : E.ULONG;        (* stacksize to use when starting task *)
  64.     priority *   : LONGINT;        (* task priority when starting task *)
  65.     startup *    : D.BPTR;         (* startup msg: FileSysStartupMsg for disks *)
  66.     segList *    : D.BPTR;         (* code to run to start new task *)
  67.     globalVec *  : D.BPTR;         (* BCPL global vector when starting task *)
  68.     (* no more entries need exist than those implied by fsePatchFlags *)
  69.   END; (* FileSysEntry *)
  70.  
  71.  
  72. (**-- Resource Base variable --------------------------------------------*)
  73.  
  74. VAR
  75.  
  76.   base * : FileSysResourcePtr;
  77.  
  78.  
  79. (**-- Resource Base variable --------------------------------------------*)
  80. (** $L- Address globals through A4 *)
  81.  
  82.  
  83. (**-----------------------------------*)
  84. PROCEDURE OpenResource * (mustOpen : BOOLEAN);
  85.  
  86. BEGIN (* OpenResource *)
  87.   IF base = NIL THEN
  88.     base := E.base.OpenResource (name);
  89.     IF mustOpen & (base = NIL) THEN HALT (100) END;
  90.   END; (* IF *)
  91. END OpenResource;
  92.  
  93.  
  94. END FileSysRes.
  95.